package com.theBlind.orm;

/**
 * @program: orm
 * @description:
 * @author: TheBlind
 * @create: 2021-04-22 15:07
 **/
public class DefaultSqlSessionFactory implements SqlSessionFactory {

    private final Configuration configuration;


    public DefaultSqlSessionFactory(Configuration configuration) {
        this.configuration = configuration;
    }

    @Override
    public SqlSession openSession() {
        return new DefaultSqlSession(configuration.connection,configuration.mapperElement);
    }
}
